home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 365_01 / cflags.ms < prev    next >
Text File  |  1992-04-04  |  14KB  |  281 lines

  1. .Go 9 "CFLAGS"
  2. .PP
  3. \*E uses many preprocessor symbols to control compilation.
  4. Some of these control the sizes of buffers and such.
  5. The "-DNO_XXXX" options remove small sets of related features.
  6. .PP
  7. Most \*E users will probably want to keep all features available.
  8. Minix-PC users, though, will have to sacrifice some sets because otherwise
  9. \*E would be too bulky to compile.
  10. The "asld" phase of the compiler craps out.
  11. .IP "-DM_SYSV, -Dbsd, -DTOS, -DCOHERENT, -Damiga"
  12. These flags tell the compiler that \*E is being compiled for
  13. System-V UNIX, BSD UNIX, Atari TOS, Coherent, or AmigaDos, respectively.
  14. For other systems, the config.h file can generally figure it out automatically.
  15. .IP -DRAINBOW
  16. For MS-DOS systems, this causes support for the DEC Rainbow to be compiled
  17. into \*E.
  18. .IP -DS5WINSIZE
  19. Some versions of SysV UNIX don't support support the "winsize"
  20. style of screen-size testing,
  21. so elvis ignores window size changes by default.
  22. .IP
  23. However, many of the newer SysV systems defines "winsize" in the
  24. file "/usr/include/sys/ptem.h".
  25. If your SysV system has "winsize" then you should add
  26. -DS5SWINSIZE to the CFLAGS setting.
  27. .IP -DTERMIOS
  28. POSIX is a SysV-derived specification which uses a terminal control
  29. package called "termios", instead of "termio".
  30. Some other SysV systems may also use termios.
  31. You can make elvis uses termios instead of the more common termio
  32. by adding -DTERMIOS to CFLAGS.
  33. (Note: This hasn't been tested very well.)
  34. .IP -DNBUFS=\fInumber\fP
  35. \*E keeps most of your text in a temporary file;
  36. only a small amount is actually stored in RAM.
  37. This flag allows you to control how much of the file can be in RAM at any time.
  38. The default is 5 blocks, and the minimum is 3 blocks.
  39. (See the -DBLKSIZE flag, below.)
  40. .IP
  41. More RAM allows global changes to happen a little faster.
  42.  f you're just making many small changes in one section of a file, though,
  43. extra RAM won't help much.
  44. .IP -DBLKSIZE=\fInumber\fP
  45. This controls the size of blocks that \*E uses internally.
  46. The value of BLKSIZE must be a power of two.
  47. Every time you double BLKSIZE, you quadruple the size of a text file that
  48. \*E can handle, but you also cause the temporary file to grow faster.
  49. For MS-DOS, Coherent, and Minix-PC, the default value is 1024, which allows
  50. you to edit files up to almost 512K bytes long.
  51. For all other systems, the default value is 2048, which allows you to edit
  52. files that are nearly 2 megabytes long.
  53. .IP
  54. The BLKSIZE also determines the maximum line length, and a few other limits.
  55. BLKSIZE should be either 256, 512, 1024, or 2048.
  56. Values other than these can lead to strange behaviour.
  57. .IP -DTMPDIR=\fIstring\fP
  58. This sets the default value of the "directory" option, which specifies where
  59. the temporary files should reside.
  60. The value of TMPDIR must be a string, so be sure your value includes the
  61. quote characters on each end.
  62. .IP "-DEXRC=\fIstr\fP, -DHMEXRC=\fIstr\fP, -DSYSEXRC=\fIstr\fP, -DEXINIT=\fIstr\fP"
  63. This lets you control the names of the initialization files.
  64. Their values must be strings, so be careful about quoting.
  65. .IP
  66. EXRC is the name of the initialization file in the current directory.
  67. Its default value is ".exrc" on UNIX systems -- the same as the real vi.
  68. Since that isn't a legal DOS filename, under DOS the default is "elvis.rc".
  69. For other systems, check the config.h file.
  70. .IP
  71. HMEXRC is the name of the initialization file in your home directory.
  72. By default, it is the same as EXRC.
  73. \*E will automatically prepend the name of your home directory to HMEXRC
  74. at run time, so don't give a full path name.
  75. .IP
  76. SYSEXRC is the name of a system-wide initialization file.
  77. It has no default value;
  78. if you don't define a value for it, then
  79. the code that supports SYSEXRC just isn't compiled.
  80. The value of SYSEXRC should be a full pathname, in quotes.
  81. .IP
  82. EXINIT is the name of an environment variable that can contain initialization
  83. commands.
  84. Normally, its value is "EXINIT".
  85. .IP -DKEYWORDPRG=\fIstring\fP
  86. This flag determines the default value of the "keywordprg" option.
  87. Its value must be a string, so be careful about quoting.
  88. The default value of this flag is "ref", which is a C reference program.
  89. .IP "-DCC_COMMAND=\fIstring\fP -DMAKE_COMMAND=\fIstring\fP -DERRLIST=\fIstring\fP"
  90. These control the names of the C compiler, the "make" utility, and the
  91. error output file, respectively.
  92. They are only used if -DNO_ERRLIST is not given.
  93. .IP
  94. The default value of CC_COMMAND depends on the Operating System and compiler
  95. that you use to compile elvis;
  96. for UNIX, the default is "cc".
  97. The default values of MAKE_COMMAND and ERRLIST are "make" and "errlist",
  98. respectively.
  99. .IP -DMAXRCLEN=\fInumber\fP
  100. This determines how large a :@ macro command can be (measured in bytes).
  101. The default is 1000 bytes.
  102. If you increase this value significantly,
  103. then you may need to allocate extra memory for the stack.
  104. See the "CHMEM" setting in the Makefile.
  105. .IP -DSHELL=\fIstring\fP
  106. This is the default value of the "shell" option, and hence
  107. the default shell used from within \*E.
  108. This only controls the default;
  109. the value you give here may be overridden at run-time by setting
  110. an environment variable named SHELL (or COMSPEC for MS-DOS).
  111. Its value must be a string constant, so be careful about quoting.
  112. .IP -DTAGS=\fIstring\fP
  113. This sets the name of the "tags" file,
  114. which is used by the :tag command.
  115. Its value must be a string constant, so be careful about quoting.
  116. .IP "-DCS_IBMPC -DCS_LATIN1 -DCS_SPECIAL"
  117. The digraph table and flipcase option will normally start out empty.
  118. However, if you add -DCS_IBMPC or -DCS_LATIN1 to your CFLAGS,
  119. then they will start out filled with values that are appropriate for the
  120. IBM PC character set or the ISO Latin-1 character set, respectively.
  121. .IP
  122. You can also use -DCS_IBMPC and -DCS_SPECIAL together to get digraphs
  123. that produce the PC's graphic characters.
  124. .IP "-DDEBUG -DEBUG2"
  125. -DDEBUG adds the ":debug" and ":validate" commands,
  126. and also adds many internal consistency checks.
  127. It increases the size of the ".text" segment by about 6K.
  128. .IP
  129. -DDEBUG2 causes a line to be appended to a file called "debug.out"
  130. everytime any change is made to the edit buffer.
  131. .IP -DCRUNCH
  132. This flag removes some non-critical code, so that \*E is smaller.
  133. For example, it removes a short-cut from the regexp package, so that
  134. text searches are slower.
  135. Also, screen updates are not as efficient.
  136. A couple of obscure features are disabled by this, too.
  137. .IP -DNO_MKEXRC
  138. This removes the ":mkexrc" command,
  139. so you have to create any .exrc files manually.
  140. The size of the .text segment will be reduced by about 600 bytes.
  141. .IP -DNO_CHARATTR
  142. Permanently disables the charattr option.
  143. This reduces the size of your ".text" segment by about 850 bytes.
  144. .IP -DNO_RECYCLE
  145. Normally, \*E will recycle space (from the temporary file) which contains
  146. totally obsolete text.
  147. This flag disables this recycling.
  148. Without recycling, the ".text" segment is about 1K smaller
  149. than it would otherwise be,
  150. but the tmp file grows much faster.
  151. If you have a lot of free space on your hard disk,
  152. but \*E is too bulky to run with recycling,
  153. then try it without recycling.
  154. .IP
  155. When using a version of \*E that has been compiled with -DNO_RECYCLE,
  156. you should be careful to avoid making many small changes to a file
  157. because each individual change will cause the tmp file to grow by at least 1k.
  158. Hitting "x" thirty times counts as thirty changes,
  159. but typing "30x" counts as one change.
  160. Also, you should occasionally do a ":w" followed by a ":e" to start with a
  161. fresh tmp file.
  162. .IP
  163. Interestingly, the real vi never recycles space from its temporary file.
  164. .IP -DNO_SENTENCE
  165. Leaves out the "(" and ")" visual mode commands.
  166. Also, the "[[", "]]", "{", and "}" commands will not recognize *roff macros.
  167. The sections and paragraphs options go away.
  168. This saves about 650 bytes in the ".text" segment.
  169. .IP -DNO_CHARSEARCH
  170. Leaves out the visual commands which locate a given character
  171. in the current line:
  172. "f", "t", "F", "T", "," and ";".
  173. This saves about 900 bytes.
  174. .IP -DNO_EXTENSIONS
  175. Leaves out the "K" and "#" visual commands.
  176. Al